package com.example.tosf.web;

import cn.hutool.db.Db;
import cn.hutool.db.Entity;
import cn.hutool.http.HttpUtil;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.sql.SQLException;

@RestController
public class HongyuController {

    @PostMapping("hongyu")
    public Object send() throws SQLException {
        String url="https://124.95.178.5:443/szf/api/jjsrgc";
        String result1= HttpUtil.get(url);
        System.out.println(result1);
        Db.use().insert(
                Entity.create("sys_user")
                        .set("name", "hongyu")
                        .set("SEX", "1")
        );
        return "success";
    }
}
